require("./src/model/sync");
const express = require("express");
const path = require("path");
const bodyParser = require('body-parser');
const cors = require("cors");
const app = express();
app.use(bodyParser.urlencoded({limit: '5000mb'}));
app.use(bodyParser.json({limit: '5000mb', extended: true}));
app.use(cors());
const staticPath = path.resolve(__dirname,"./public")
app.use(express.static(staticPath));

const recordRouter = require("./src/router/api/record");
app.use("/api/record", recordRouter);

const port = "8088";
app.listen(port, () => {
  console.log("listening on 8088");
});